//
//  TabBarViewController.m
//  LOLBOX
//
//  Created by lanou3g on 15/12/17.
//  Copyright © 2015年 张明. All rights reserved.
//
#import "TabBarViewController.h"
#import "MessageViewController.h"
#import "VideoViewController.h"
#import "HerosViewController.h"
#import "UserViewController.h"


@interface TabBarViewController ()

@end

@implementation TabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    MessageViewController *homepageTBVC = [[MessageViewController alloc] init];
    UINavigationController *homepageVC = [[UINavigationController alloc] initWithRootViewController:homepageTBVC];
    homepageVC.tabBarItem = [[UITabBarItem alloc] init];
    homepageVC.tabBarItem.title = @"资讯";
    homepageVC.tabBarItem.image = [UIImage imageNamed:@"201"];
    homepageTBVC.navigationItem.title = @"新闻资讯";
    
    // 创建发现页控制器
    VideoViewController *meetTBVC = [[VideoViewController alloc] init];
    UINavigationController *meetVC = [[UINavigationController alloc] initWithRootViewController:meetTBVC];
    meetVC.tabBarItem = [[UITabBarItem alloc] init];
    meetVC.tabBarItem.title = @"视频";
    meetVC.tabBarItem.image = [UIImage imageNamed:@"202"];
    meetTBVC.navigationItem.title = @"明星主播";
    
    // 创建添加页面控制器
    HerosViewController *addTBVC = [[HerosViewController alloc] init];
    UINavigationController *addVC = [[UINavigationController alloc] initWithRootViewController:addTBVC];
    // addVC.tabBarItem = [[UITabBarItem alloc] init];
    addVC.tabBarItem.title = @"英雄";
    addVC.tabBarItem.image = [UIImage imageNamed:@"205"];
    addTBVC.navigationItem.title = @"英雄会";
    
    // 创建消息页控制器
    UserViewController *messageTBVC = [[UserViewController alloc] init];
    UINavigationController *messageVC = [[UINavigationController alloc] initWithRootViewController:messageTBVC];
    //messageVC.tabBarItem = [[UITabBarItem alloc] init];
    messageVC.tabBarItem.title = @"我的";
    messageVC.tabBarItem.image = [UIImage imageNamed:@"204"];
    messageTBVC.navigationItem.title = @"个人中心";
    
    self.viewControllers = @[homepageVC,meetVC,addVC,messageVC];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
